﻿<Window x:Class="Onvif_IP_Camera_Manager.View.EmailWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        DataContext="{Binding RelativeSource={RelativeSource Self}}"
        Icon="/Onvif IP Camera Manager;component/Resources/ip_camera_sdk_icon_transparent_128x128.png"
        Title="Email settings" Height="550" Width="420" WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
    <Window.Resources>
        <Style x:Key="{x:Type Label}" TargetType="Label">
            <Setter Property="HorizontalAlignment" Value="Right"/>
            <Setter Property="HorizontalContentAlignment" Value="Right"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Height" Value="25"/>
        </Style>

        <Style x:Key="{x:Type TextBox}" TargetType="TextBox">
            <Setter Property="HorizontalAlignment" Value="Stretch"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
            
        </Style>

        <Style x:Key="{x:Type Button}" TargetType="Button">
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Height" Value="25"/>
            <Setter Property="Width" Value="50"/>
            <Setter Property="Margin" Value="5"/>
             <Setter Property="VerticalAlignment" Value="Top"/>
        </Style>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="5*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="5*"/>
        </Grid.ColumnDefinitions>

        <Label Grid.Row="0" Grid.Column="0" Content="From"/>
        <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding FromAddress}"/>

        <Label Grid.Row="1" Grid.Column="0" Content="Password"/>
        <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Password}"/>
        
        <Label Grid.Row="2" Grid.Column="0" Content="To"/>
        <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding To}"/>

        <Label Grid.Row="3" Grid.Column="0" Content="Subject"/>
        <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Subject}"/>

        <Label Grid.Row="4" Grid.Column="0" Content="Body"/>
        <TextBox Grid.Row="4" Grid.Column="1" Text="{Binding Body}" 
                 Height="AUTO" Width="AUTO" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
                 TextWrapping="Wrap" AcceptsReturn="True" HorizontalContentAlignment="Left" VerticalContentAlignment="Top" />

        <Label Grid.Row="5" Grid.Column="0" Content="SMTP"/>
        <Grid Grid.Row="5" Grid.Column="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBox Grid.Column="0" Text="{Binding Smtp}"/>
        </Grid>
        <Label Grid.Row="6" Grid.Column="0" Content="Port"/>
        <Grid Grid.Row="6" Grid.Column="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBox Grid.Column="0" Text="{Binding Port}"/>
        </Grid>
      
        

        <Grid Grid.Row="7" Grid.Column="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button Grid.Column="0" Content="Ok" HorizontalAlignment="Center" Click="OkButton_OnClick" IsDefault="True"/>
            <Button IsCancel="True" Grid.Column="1" Content="Cancel" HorizontalAlignment="Center" Click="CancelButton_Click"/>
        </Grid>
    </Grid>
</Window>
